#ifndef _SCENE_H_
#define _SCENE_H_

#include <string>
#include "triangle.h"
#include "intersection.h"

class Scene {
public:
	Scene();
	~Scene();

	void generateDefault();

	void load(const std::string& fname);
	void save(const std::string& fname);

	void clear();

	// Find closest intersection in the scene.
	// Return: false if no intersection found.
	bool closestIntersect(const Ray& ray, Intersection* i) const;

    const Triangle::List& getTriangles() const {
        return _triangles;
    }

private:
	Triangle::List _triangles;
};

#endif // _SCENE_H_
